package com.uchengwang.ui.cm_ui.umsg.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.GridView;

import com.uchengwang.R;
import com.uchengwang.ui.base_ui.basefm.BaseFragment;
import com.uchengwang.ui.cm_ui.release.adapter.ReleaseAdapter;
import com.uchengwang.ui.cm_ui.release.bean.ReleaseBean;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Mizlicai on 2017/9/3.
 * 切换到社团简约版的发布
 */

public class ClubFragmentRelease extends BaseFragment {
    private View view;
    private GridView gridView;

    private ReleaseAdapter adapter;
    private List<ReleaseBean> list;


    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        setLayoutId(R.layout.fragment_club_release);
        view = super.onCreateView(inflater, container, savedInstanceState);

        initView(view);
        return view;
    }


    private void initView(View view){
        gridView = (GridView) view.findViewById(R.id.fast_gv);

        initData();
    }

    private void initData(){
        list = new ArrayList<>();

//        list.add(new ReleaseBean(R.drawable.image_find_friend_no, "找人"));
//        list.add(new ReleaseBean(R.drawable.image_find_club_no, "找社团"));
////        list.add(new ReleaseBean(R.drawable.image_group_no, "群聊"));
//
//        list.add(new ReleaseBean(R.drawable.image_u_study_no, "U学"));
//        list.add(new ReleaseBean(R.drawable.image_u_game_no, "U赛"));
//        list.add(new ReleaseBean(R.drawable.image_u_walk_no, "U行"));
//        list.add(new ReleaseBean(R.drawable.image_benefit_no, "公益倡议"));
//        list.add(new ReleaseBean(R.drawable.image_club_share_no, "社团分享"));


        adapter = new ReleaseAdapter(this.getContext(),list, false);
        gridView.setAdapter(adapter);
    }

}
